package com.translate.web.service.impl;

import com.translate.web.constant.RedisConstant;
import com.translate.web.dao.IdentityMapper;
import com.translate.entity.ActivityManager;
import com.translate.entity.Identity;
import com.translate.vo.contract.IIdentityVO;
import com.translate.web.service.IIdentityService;
import com.basic.service.impl.BaseServiceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class IdentityServiceImpl extends BaseTranslateServiceImpl<Identity> implements IIdentityService {
	
	@Resource
	public void setRedisTemplate(RedisTemplate<String, List<Identity>> redisTemplate) {
		this.redisTemplate = redisTemplate;
	}

	public IdentityServiceImpl(IdentityMapper mapper) {
		super(mapper);
	}


	protected Class<Identity> getEntityClass() {
		return Identity.class;
	}

	@Override
	public <VO extends IIdentityVO> List<VO> getListFromCache(Class<VO> target) {
		return this.entityConvertToVo(this.listToCache(RedisConstant.IDENTITY_KEY, 100), target);

	}
}